const path = require("path");
module.exports = {
	// presets: [
	//   '@vue/cli-plugin-babel/preset'
	// ],
	// 这里是配置上线读取当前目录，默认是根路径，如 /js, /css 等，具体根据项目来
	publicPath: process.env.NODE_ENV === 'production' ? './' : '/',
	//baseUrl:'./',

	outputDir: 'dist',
	devServer: {
		https: true,
		proxy: {
			'^/proxy': {
				target: 'https://www.cansiplatform.com/api', // 这里填写你的后端服务地址
				changeOrigin: true,
				pathRewrite: (path) => {
					console.log(path)
					return path.replace(/^\/proxy/, '');
				},
			},
		},
	},
	configureWebpack: {
		resolve: {
			alias: {
				"@": path.resolve(__dirname, 'src/'),
			},
		}
	},
	lintOnSave: process.env.NODE_ENV !== 'production',
	filenameHashing: true,
};
